//async 定义为异步方法
async function testAsync(){
    return 'Hello async'
}

function getSomething(){
    return 'something';
}

//await = async + wait
const result = testAsync();
console.log(result);

async function test(){
    //await必须放在 async中,不然会造成阻塞
    const v1 = await getSomething();
    const v2 = await testAsync();

    //await 不仅可以接收await 还可以接收普通对象
    console.log(v1);
    console.log(v2);
}

test();